//
//
// Adventure screen handler for the Mage's Chest
//
// L. Dean Gibson II  2/13/01
//
//

#ifndef ADV_MAGES_CHEST_H_INCLUDED
#define ADV_MAGES_CHEST_H_INCLUDED

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#include "artifact_type.h"
#include "stationary_adventure_object.h"

// -------------------------------------------------------
// artifact as it appears on the adventure map
// -------------------------------------------------------
class t_adv_mages_chest : public t_stationary_adventure_object
{
public:
	t_adv_mages_chest(  std::string const& source);
	virtual void        activate_trigger( t_army* army, t_adv_map_point const& point, 
		                                  t_direction direction, t_adventure_frame* frame );
	virtual float		ai_value( t_adventure_ai const& ai, t_creature_array const& army, int move_cost ) const;	
	virtual void        initialize( t_adventure_map& map );
	virtual bool        read( std::streambuf&						stream, 
					          t_qualified_adv_object_type const&	type,
					          int									version );
	virtual void		right_click( t_mouse_event const& event,
		                             t_adventure_frame* adventure_frame );
	virtual bool        write( std::streambuf& stream ) const;
protected:
	t_artifact_type m_artifact;

};

// -------------------------------------------------------
// artifact as it appears on the adventure map
// -------------------------------------------------------
class t_adv_shipwreck_survivor : public t_adv_mages_chest
{
public:
	t_adv_shipwreck_survivor( std::string const& model_name );

	virtual void	initialize( t_adventure_map& map );
	virtual int		get_version() const;
	virtual bool	read( std::streambuf&						stream, 
					   t_qualified_adv_object_type const&	type,
					   int									version );
};

inline t_adv_shipwreck_survivor::t_adv_shipwreck_survivor(  std::string const& source )
                               : t_adv_mages_chest( source )
{
}

// -------------------------------------------------------
// artifact as it appears on the adventure map
// -------------------------------------------------------
class t_adv_travelers_backpack : public t_adv_mages_chest
{
public:
	t_adv_travelers_backpack( std::string const& model_name );
	virtual void initialize( t_adventure_map& map );
};

inline t_adv_travelers_backpack::t_adv_travelers_backpack(  std::string const& source )
                               : t_adv_mages_chest( source )
{
}

// -------------------------------------------------------
// artifact as it appears on the adventure map
// -------------------------------------------------------
class t_adv_skeleton : public t_adv_mages_chest
{
public:
	t_adv_skeleton( std::string const& model_name );
	virtual void		initialize( t_adventure_map& map );
};

inline t_adv_skeleton::t_adv_skeleton(  std::string const& source )
                               : t_adv_mages_chest( source )
{
}

#endif // ADV_MAGES_CHEST_H_INCLUDED